package com.gr.staffpm.tasks.service;

import java.util.Date;
import java.util.List;

import org.hibernate.Session;
import org.joda.time.DateTime;

import com.gr.staffpm.datatypes.Task;
import com.gr.staffpm.datatypes.TaskComment;
import com.gr.staffpm.datatypes.TaskImportance;
import com.gr.staffpm.datatypes.TaskStatus;
import com.gr.staffpm.datatypes.User;
import com.gr.staffpm.pages.schedule.Schedule;
import com.gr.staffpm.pages.schedule.model.Event;

public interface TaskService {

    TaskComment getComment(int id);

    void addComment(TaskComment comment);

    List<TaskComment> getAllComments(Task task);

    List<TaskComment> getComments(Task task, int first, int count, String property, boolean ascending);

    Task getTask(int id);

    void updateTask(Task task);

    List<TaskStatus> getAllStatuses();

    List<TaskImportance> getAllImportances();

    TaskStatus getInProgressStatus();

    TaskStatus getOpenStatus();

    TaskStatus getClosedStatus();

    List<Task> getTasksDueBetween(Date startDate, Date endDate);

    List<Task> getTasksDueOn(Date time);

    List<Task> getUserTasks(User user);

    List<Task> findTask(String query);

    Session getSession();

    void createIndex();

    List<Task> getUnresolvedUserTasksBetweenDates(User user, Date start, Date end);

    List<Event> getTasksDueBetweenForUser(Schedule schedule, User user, DateTime start, DateTime end);

}
